package br.com.rookgraph;

public class GraphPopulator {
	
	protected static final Edge edger1;
	protected static final Edge edger2;
	protected static final Edge edger3;
	protected static final Edge edger4;
	protected static final Edge edger5;
	protected static final Edge edger6;
	
	static {
		edger1 = new Edge(1, 2);
		edger2 = new Edge(3, 2);
		edger3 = new Edge(1, 3);
		edger4 = new Edge(3, 4); 
		edger5 = new Edge(1, 5); 
		edger6 = new Edge(5, 6); 
	}
	
	
	public static Graph getFullGraph(){
		Graph graph = new Graph(6);
		graph.addEdge(edger1);
		graph.addEdge(edger2);
		graph.addEdge(edger3);
		graph.addEdge(edger4);
		graph.addEdge(edger5);
		graph.addEdge(edger6);
		return graph;
	}
	
	public static Graph newGraph(int order){
		return new Graph(order);
	}
	
	public static Graph getFullGraphException(Edge ...edges){
		Graph graph = new Graph(6);
		for (Edge edge : edges) {
			if(!edge.equals(edger6)&&!edge.equals(edger5))
				graph.removeEdge(edge);
		}
		return graph;
	}
	
}
